home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / swag / drives.swg / 0056_Bytes per sector on disk.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-09-26  |  701 b   |  20 lines

  1. {*****************************************************************************
  2.  * Function ...... BytesPerSector()
  3.  * Purpose ....... To return the number of bytes per sector of a disk
  4.  * Parameters .... nDrive          Drive containing disk
  5.  * Returns ....... The number of bytes per sector of the specified disk
  6.  * Notes ......... None
  7.  * Author ........ Martin Richardson
  8.  * Date .......... May 13, 1992
  9.  *****************************************************************************}
  10. FUNCTION BytesPerSector( nDrive: BYTE ): INTEGER;
  11. VAR 
  12.    Regs: Registers;
  13. BEGIN
  14.      Regs.AH := $1C;
  15.      Regs.DL := nDrive;
  16.      MSDOS( Regs );
  17.      BytesPerSector := Regs.AL * Regs.CX;
  18. END;
  19.  
  20.